package com.creditease.cn.monitor.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import redis.clients.jedis.Jedis;

import com.creditease.cn.monitor.dao.redis.SlaveRedisNode;
import com.creditease.cn.monitor.service.ListService;

@Service
public class ListServiceImpl implements ListService{
	private Logger logger = LoggerFactory.getLogger(ListServiceImpl.class);
	@Autowired
	private SlaveRedisNode slaveRedisNode;
	
	public List<String> getValue(String key,long start,long end) {
		Jedis jedis = slaveRedisNode.getConnection();
		List<String> result = jedis.lrange(key, start, end);
		return result;
	}

}
